<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" th:href="@{/css/font.css}">
    <link rel="stylesheet" th:href="@{/css/xadmin.css}">
    <script th:src="@{/webjars/jquery/3.5.1/jquery.min.js}"></script>
</head>
<body>
<div class="x-body">
    <blockquote class="layui-elem-quote" style="font-size: 24px">欢迎使用内部办公网系统</blockquote>
    <fieldset class="layui-elem-field">
        <legend>信息统计</legend>
        <div class="layui-field-box">
            <table class="layui-table" lay-even>
                <thead>
                <tr>
                    <th>统计</th>
                    <th>产品库</th>
                    <th>用户</th>
                    <th>售货员</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>总数</td>
                    <td th:text="${WAM}">0</td>
                    <td th:text="${UAM}">8</td>
                    <td th:text="${SAM}">20</td>
                </tr>
                <tr>
                    <td>今日</td>
                    <td th:text="${WTWN}">0</td>
                    <td th:text="${UTUN}">8</td>
                    <td th:text="${SWSN}">20</td>
                </tr>
                <tr>
                    <td>昨日</td>
                    <td th:text="${WYMN}">0</td>
                    <td th:text="${UYWN}">8</td>
                    <td th:text="${SYSN}">20</td>
                </tr>
                <tr>
                    <td>本周</td>
                    <td th:text="${WCMN}">0</td>
                    <td th:text="${UCMN}">8</td>
                    <td th:text="${SCWN}">20</td>
                </tr>
                <tr>
                    <td>本月</td>
                    <td th:text="${WCWN}">0</td>
                    <td th:text="${UCWN}">8</td>
                    <td th:text="${SCWN}">20</td>
                </tr>
                </tbody>
            </table>
            <table class="layui-table">
                <thead>
                <tr>
                    <th colspan="2" scope="col">服务器信息</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <th width="30%">服务器计算机名</th>
                    <td><span id="host" th:text="${_NAME}"></span></td>
                </tr>
                <tr>
                    <td>服务器操作系统</td>
                    <td id="os" th:text="${_OS}"></td>
                </tr>
                <tr>
                    <td>系统架构</td>
                    <td id="adl" th:text="${_ARCH}"></td>
                </tr>
                <tr>
                    <td>核心数</td>
                    <td id="core-num" th:text="${_CORE}"></td>
                </tr>
                <tr>
                    <td>内存占用</td>
                    <td id="memory" th:text="${_Memory+'%'}"></td>
                </tr>
                <tr>
                    <td>硬盘使用情况</td>
                    <td id="disk">3.29M</td>
                </tr>
                </tbody>
            </table>
        </div>
    </fieldset>
    <blockquote class="layui-elem-quote layui-quote-nm">感谢layui,jquery,大笑，本后台系统由X前端框架提供前端技术支持。</blockquote>

</div>
</body>
<!--<script type="text/javascript">-->
<!--    $(function () {-->
<!--        getSysInfo();-->
<!--        setInterval(getSysInfo,1000*60);-->
<!--    });-->

<!--    function getSysInfo() {-->
<!--        $.ajax({-->
<!--            url: "{{urlfor "SysInfo.GetInfo"}}",-->
<!--            type: "get",-->
<!--            success: function (data) {-->
<!--                info = data.data-->
<!--                $("#host").text(info.host)-->
<!--                $("#os").text(info.os)-->
<!--                $("#adl").text(info.adl)-->
<!--                $("#lag").text(info.version)-->
<!--                $("#cpu").text(info.cpu.name)-->
<!--                $("#core-num").text(info.cpu.cores)-->
<!--                $("#cpu-mhz").text(info.cpu.mhz)-->
<!--                $("#core").text(info.cpu.cores)-->
<!--                $("#memory").text(info.memory.used+'/'+info.memory.total+'('+info.memory.percent+')')-->
<!--                var disk = ""-->
<!--                for (var i =0 ;i<info.disk.length;i++) {-->
<!--                    d = info.disk[i]-->
<!--                    if (i<info.disk.length-1) {-->
<!--                        disk += d.name+d.used+"/"+d.total+"("+d.percent+");\n"-->
<!--                    } else {-->
<!--                        disk += d.name+d.used+"/"+d.total+"("+d.percent+")"-->
<!--                    }-->
<!--                }-->
<!--                $("#disk").text(disk)-->

<!--            }-->
<!--        })-->
<!--    }-->
<!--// </script>-->
</html>